package cn.dgut.aop;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AdviceAop {

    @Before("within(cn.dgut.event.*)")
    public void adviceBefore(){
        System.out.println("监听到事件的响应方法，执行前置通知");
    }
    @After("execution(public * *(..))")
    public void adviceAfter(){
        System.out.println("监听到事件的响应方法，执行后置通知");
    }
}
